#pragma once

#include<iostream>
#include<stack>
#include<functional>
#include<string>
#include"log.hpp"

typedef std::function<int (int,int)> func_tt;

class Task
{
public:
    Task(){}
    Task(int x,int y,func_tt func)
    :x_(x),y_(y),func_(func)
    {}

    void operator()(const std::string name)
    {
        logMessage(WARNING,"%s处理：%d+%d= %d | %s | %d ",name.c_str(),
        x_,y_,func_(x_,y_),__FILE__,__LINE__);
    }
public:
    int x_;
    int y_;
    func_tt func_;
};